package com.tianxiabuyi.weixin.qy.message.json;


import com.alibaba.fastjson.annotation.JSONField;
import com.tianxiabuyi.weixin.common.message.Media;
import com.tianxiabuyi.weixin.common.message.MsgType;

/**
 * 图片类消息
 */
public class ImageMessage extends JsonMessage {

    @JSONField(name = "image")
    private Media media;

    private int safe;

    public ImageMessage() {
        this.msgType = MsgType.image;
    }

    public int isSafe() {
        return safe;
    }

    public void setSafe(int safe) {
        this.safe = safe;
    }

    public Media getMedia() {
        return media;
    }

    public void setMedia(Media media) {
        this.media = media;
    }

    public ImageMessage image(String mediaId) {
        this.media = new Media(mediaId);
        return this;
    }

    public ImageMessage safe() {
        this.safe = 1;
        return this;
    }
}
